<template>

    <el-table
            :data="testData"
            style="width: 100%">
        <el-table-column type="expand">
            <template slot-scope="props">
                <el-form label-position="left" inline class="demo-table-expand">
                    <el-form-item label="问题名称">
                        <span>{{ props.row.name}}</span>
                    </el-form-item>

                    <!--<el-form-item label="问题ID">
                        <span>{{ props.row.id }}</span>
                    </el-form-item>-->

                    <el-form-item label="问题分类">
                        <span>{{ props.row.category }}</span>
                    </el-form-item>
                    <el-form-item label="报送监区">
                        <span>{{ props.row.reDep }}</span>
                    </el-form-item>
                    <el-form-item label="报送人">
                        <span>{{ props.row.reName }}</span>
                    </el-form-item>
                    <el-form-item label="报送人联系方式">
                        <span>{{ props.row.rePhone }}</span>
                    </el-form-item>
                    <el-form-item label="问题描述">
                        <span>{{ props.row.desc }}</span>
                    </el-form-item>
                    <el-form-item label="问题详情">
                        <span>{{props.row.detail}}</span>
                    </el-form-item>
                    <el-form-item label="问题处理状态">
                        <span>{{ props.row.status }}</span>
                    </el-form-item>
                    <el-form-item label="报送科室">
                        <span>{{ props.row.department }}</span>
                    </el-form-item>
                    <el-form-item label="报送日期">
                        <span>{{props.row.reDate}}</span>
                    </el-form-item>
                    <el-form-item label="处理日期">
                        <span>{{props.row.dealDate}}</span>
                    </el-form-item>

                    <el-form-item label="处理情况描述">
                        <span>{{props.row.dealDesc}}</span>
                    </el-form-item>

                </el-form>
            </template>
        </el-table-column>


        <el-table-column
                label="问题名称"
                prop="name">

        </el-table-column>
        <el-table-column
                label="问题描述"
                prop="desc">
        </el-table-column>
        <el-table-column
                label="问题状态"
                prop="status">
        </el-table-column>

    </el-table>
</template>

<script>
    import axios from '~/plugins/axios'

    export default {
        data() {
            return {
                testData:[],
                name:'',
            }

        },
        mounted() {
            this.showData()
        },
        methods: {
            formatter(row, column) {
                return row.address;
            },

            showData() {
                axios.get('/api/get/IssueList').then(res=>{
                    this.testData = res.data
                })
            }
        }
    }
</script>


<style>

    .el-table .warning-row {
        background: oldlace;
    }

    .el-table .success-row {
        background: #f0f9eb;
    }
    .demo-table-expand {
        font-size: 0;
    }
    .demo-table-expand label {
        width: 160px;
        color: #99a9bf;
    }
    .demo-table-expand .el-form-item {
        margin-right: 0;
        margin-bottom: 0;
        width: 50%;
    }
</style>